home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / pdcurs21.zip / FLEXOS.ZIP / _16BITMO.C next >
Text File  |  1992-11-21  |  2KB  |  53 lines

  1. #define        CURSES_LIBRARY  1
  2. #include <curses.h>
  3.  
  4. #ifndef        NDEBUG
  5. char *rcsid__16bitmo = "$Header: c:/curses/flexos/RCS/_16bitmod.c%v 2.0 1992/11/15 02:42:04 mh Rel $";
  6. #endif
  7.  
  8.  
  9.  
  10.  
  11. #ifdef FLEXOS
  12. /*man-start*********************************************************************
  13.  
  14.   _flexos_16bitmode()  - Puts console 16 bit mode.
  15.  
  16.   PDCurses Description:
  17.        This routine sets 16 bit mode (8 bit character +
  18.        8 bit attribute) for Flexos.
  19.  
  20.   PDCurses Return Value:
  21.        This function returns OK on success and ERR on error.
  22.  
  23.   PDCurses Errors:
  24.        Under FLEXOS, an ERR will be returned if the s_get() call
  25.        fails, or if the s_set() call fails.  You are referred to
  26.        the Flexos Programmer's Reference Guide for details on the
  27.        actual error.
  28.  
  29.   Portability:
  30.        PDCurses        int _flexos_16bitmode( void );
  31.  
  32. **man-end**********************************************************************/
  33.  
  34. int    _flexos_16bitmode(void)
  35. {
  36. extern VIRCON  vir;            /* Allocate a Virtual Console Structure */
  37.  
  38.        retcode = s_get(T_VIRCON, 0L, (char *) &vir, (long) sizeof(vir));
  39.        if (retcode < 0L)
  40.                return( ERR );
  41.  
  42.        vir.vc_kbmode = vir.vc_kbmode | (VCKM_NABORT | VCKM_NSTOP |
  43.                                         VCKM_NXLAT  | VCKM_NESC  |
  44.                                         VCKM_16BIT  | VCKM_NECHO |
  45.                                         VCKM_NEOF);
  46.  
  47.        vir.vc_smode = vir.vc_smode | VCSM_16BIT;
  48.  
  49.        retcode = s_set(T_VIRCON, 0L, (char *) &vir, (long) sizeof(vir));
  50.        return( (retcode < 0L) ? ERR : OK );
  51. }
  52. #endif
  53.